package common.util
{
	public class FuncParamUtil
	{
		public function FuncParamUtil()
		{
		}
		/** 
		 * 在添加监听时，需要传递参数时调用
		 * 
		 * linkButton.addEventListener(MouseEvent.MOUSE_OVER,create(mainMenuMousOver,linkButton));
		 * 	
		 * protected function mainMenuMousOver(event:MouseEvent,select:LinkButton):void
		 {
		 * }
		 */  
		public static function create(f:Function,... arg):Function {  
			var F:Boolean=false;  
			var _f:Function=function(e:*,..._arg):void{  
				_arg=arg  
				if(!F){  
					F=true  
					_arg.unshift(e)  
				}  
				f.apply(null,_arg)  
			};  
			return _f;  
		} 
		
	}
}